package com.example.makerspace.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.Date;

@EqualsAndHashCode(callSuper = true)
@TableName(value = "t_news")
@Data
@Document(indexName = "t_news")
public class NewsDO extends BaseDO{

    @Field(name = "title", type = FieldType.Text, analyzer="ik_max_word")
    private String title;

    @Field(name = "content", type = FieldType.Text, analyzer="ik_max_word")
    private String content;

    @Field(name = "rich_text", type = FieldType.Text, analyzer="ik_max_word")
    private String richText;
    private Integer status;
    private Date showTime;
}
